<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="UsertableEditDlg" widgetVar="UsertableEditDialog" modal="true" resizable="false"  appendTo="@(body)" header="#{myBundle.EditUsertableTitle}" closeOnEscape="true">

            <h:form id="UsertableEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{usertableController.selected != null}">

                        <h:outputLabel value="#{myBundle.EditUsertableLabel_id}" for="id" />
                        <h:outputText id="id" value="#{usertableController.selected.id}" />


                        <p:outputLabel value="#{myBundle.EditUsertableLabel_name}" for="name" />
                        <p:inputText id="name" value="#{usertableController.selected.name}" title="#{myBundle.EditUsertableTitle_name}" required="true" requiredMessage="#{myBundle.EditUsertableRequiredMessage_name}" size="50" maxlength="50"/>


                        <p:outputLabel value="#{myBundle.EditUsertableLabel_password}" for="password" />
                        <p:inputText id="password" value="#{usertableController.selected.password}" title="#{myBundle.EditUsertableTitle_password}" required="true" requiredMessage="#{myBundle.EditUsertableRequiredMessage_password}" size="50" maxlength="50"/>


                        <p:outputLabel value="#{myBundle.EditUsertableLabel_ip}" for="ip" />
                        <p:inputText id="ip" value="#{usertableController.selected.ip}" title="#{myBundle.EditUsertableTitle_ip}" required="true" requiredMessage="#{myBundle.EditUsertableRequiredMessage_ip}" size="15" maxlength="15"/>


                        <p:outputLabel value="#{myBundle.EditUsertableLabel_status}" for="status" />
                        <p:inputText id="status" value="#{usertableController.selected.status}" title="#{myBundle.EditUsertableTitle_status}" required="true" requiredMessage="#{myBundle.EditUsertableRequiredMessage_status}" size="10" maxlength="10"/>


                        <p:outputLabel value="#{myBundle.EditUsertableLabel_vorname}" for="vorname" />
                        <p:inputText id="vorname" value="#{usertableController.selected.vorname}" title="#{myBundle.EditUsertableTitle_vorname}" required="true" requiredMessage="#{myBundle.EditUsertableRequiredMessage_vorname}" size="100" maxlength="100"/>


                        <p:outputLabel value="#{myBundle.EditUsertableLabel_nachname}" for="nachname" />
                        <p:inputText id="nachname" value="#{usertableController.selected.nachname}" title="#{myBundle.EditUsertableTitle_nachname}" required="true" requiredMessage="#{myBundle.EditUsertableRequiredMessage_nachname}" size="100" maxlength="100"/>


                        <p:outputLabel value="#{myBundle.EditUsertableLabel_avatar}" for="avatar" />
                        <p:inputText id="avatar" value="#{usertableController.selected.avatar}" title="#{myBundle.EditUsertableTitle_avatar}" required="true" requiredMessage="#{myBundle.EditUsertableRequiredMessage_avatar}" size="255" maxlength="255"/>


                        <p:outputLabel value="#{myBundle.EditUsertableLabel_clan}" for="clan" />
                        <p:inputText id="clan" value="#{usertableController.selected.clan}" title="#{myBundle.EditUsertableTitle_clan}" required="true" requiredMessage="#{myBundle.EditUsertableRequiredMessage_clan}" size="100" maxlength="100"/>


                        <p:outputLabel value="#{myBundle.EditUsertableLabel_session}" for="session" />
                        <p:inputText id="session" value="#{usertableController.selected.session}" title="#{myBundle.EditUsertableTitle_session}" required="true" requiredMessage="#{myBundle.EditUsertableRequiredMessage_session}" size="255" maxlength="255"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{usertableController.save}" value="#{myBundle.Save}" update="display,:UsertableListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,UsertableEditDialog);">
                        <p:confirm header="#{myBundle.ConfirmationHeader}" message="#{myBundle.ConfirmEditMessage}" icon="ui-icon-alert"/>
                    </p:commandButton>
                    <p:commandButton value="#{myBundle.Cancel}" onclick="UsertableEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
